package com.yh.doing.observer_pattern.version3;

/**
 * Created by Rocky on xxxx-xx-xx.
 */
public class Wangsi implements Observer {
    @Override
    public void update(String string) {
        System.out.println("王斯：观察到李斯活动，开始向老板汇报了...");
        this.reportToQiShiHuang(string);
        System.out.println("王斯：汇报完毕，秦老板赏给他两个萝卜吃吃...\n");
    }

    //汇报给秦始皇
    private void reportToQiShiHuang(String reportContext){
        System.out.println("王斯：报告，秦老板！韩非子有活动了--->"+reportContext);
    }
}
